import VueRouter from 'vue-router'

import home from './components/tarbar/home.vue'
import menber from './components/tarbar/menber.vue'
import search from './components/tarbar/search.vue'
import shoopcar from './components/tarbar/shoopcar.vue'
import newlist from './components/new/newlist.vue'
import newinfo from './components/new/newinfo.vue'

import photolist from './components/potots/photolist.vue'
import photoinfo from './components/potots/photoinfo.vue'


import goodslist from './components/goods/goodslist.vue'
import goodsinfo from './components/goods/goodsinfo.vue'


import goodssuggest from './components/goods/goodssuggest.vue'
import goodscomment from './components/goods/goodscomment.vue'

//············································································


var router = new VueRouter({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: home
        },
        {
            path: '/menber',
            component: menber
        },
        {
            path: '/search',
            component: search
        },
        {
            path: '/shoopcar',
            component: shoopcar
        },
        {
            path: '/home/newlist',
            component: newlist
        },
        {
            path: '/home/newlist/newinfo/:id',
            component: newinfo
        },
        {
            path: '/home/photolist',
            component: photolist
        },

        {
            path: '/home/photolist/potoinfo/:id',
            component: photoinfo
        },

        {
            path: '/home/goodslist',
            component: goodslist
        },
        {
            path: '/home/goodslist/goodsinfo/:id',
            component: goodsinfo,
            name: 'GoodsInfo'
        },
        {
            path: '/home/goodslist/goodsinfo/goodssuggest/:id',
            component: goodssuggest,
            name: 'goodssuggest'
        },
        {
            path: '/home/goodslist/goodsinfo/goodscomment/:id',
            component: goodscomment,
            name: 'goodscomment'
        }





    ],
    linkActiveClass: 'mui-active', //切换类的高亮

})

export default router